<template>
    <div class="policydetails">
        <div class="pdbg"></div>
        <div class="policydetailsconyent">
            <div class="content1">
                <div class="itemtitle">
                    <div class="itemtitle_div2">
                        <span class="titlename">{{fcinfo.riskName}}</span>
                        <div class="topright" :class="{stateactive3:fcinfo.isExpire=='保障中',stateactive4:fcinfo.isExpire=='已过期',stateactive5:fcinfo.isExpire=='未起保'}">
                            <!-- <span class="state">{{fcinfo.isExpire}}</span> -->
                        </div>
                    </div>
                </div>
                <div class="itemcontent" style="color: #666666;">
                    <p><span>保单号</span><span>{{fcinfo.policyNo}} <div style="display: inline-block;height: 14px;line-height: 14px; font-size: 14px;" v-clipboard:copy="fcinfo.policyNo" v-clipboard:success="onCopy" v-clipboard:error="onError">&nbsp | &nbsp复制</div></span></p>
                    <p v-if="licenseDetail"><span>投保车辆</span><span>{{fcinfo.licenseNo}}</span></p>
                    <p><span>保险期限</span><span v-if="fcinfo.startDate && fcinfo.endDate">
                            <!-- {{(fcinfo.startDate).replace(/-/g,"/")}}-{{(fcinfo.endDate).replace(/-/g,"/")}}</span></p> -->
                            {{fcinfo.startDate}}&nbsp至&nbsp{{fcinfo.endDate}}</span></p>
                    <!-- <hr> -->
                    <div class="sum">总保费<span>&nbsp{{fcinfo.sumPremium}}&nbsp</span>元</div>
                </div>
            </div>

            <div class="content3">
                <div class="c3">
                    <p>保险责任/条款</p>
                    <div>
                        <p><span style="color: black;font-weight: bolder;font-size: 14px;">险别名称</span><span style="color: black;font-weight: bolder;font-size: 14px;">保险金额</span></p>
                        <p v-for="(list,index) in fcinfo.itemInfs" v-bind:key="index"><span>{{list.itemName}}</span><span>{{(list.itemAmount>10000?(((list.itemAmount-list.itemAmount%100)/10000+'万元')):(list.itemAmount+'元'))}}</span></p>
                        <!-- <p><span>第三者责任保险</span><span>100000.00</span></p> -->
                        <!--   <p><span>指定修理长险</span><span><img src="~@/assets/img/icon4.png" alt=""></span></p>
                    <p><span>不计免赔率险(机动车损失保险)</span><span><img src="~@/assets/img/icon4.png" alt=""></span></p>
                    <p><span>不计免赔率险(第三者责任保险)</span><span><img src="~@/assets/img/icon4.png" alt=""></span></p> -->
                    </div>
                </div>
            </div>
            <div class="content2">
                <div class="c2">
                    <div class="c2_title " v-bind:class="aflog==1 ? {c2_title1:show1}:{c2_title2:true}">
                        <span @click="activepeople(1)" v-bind:class="aflog==1 ? {active:show1}:{active:false}">投保人</span>
                        <span @click="activepeople(2)" v-bind:class="aflog==2 ? {active:show2}:{active:false}">被保人</span>
                    </div>
                    <div class="c2_cc">
                        <div class="c2_content1" v-show="show1">
                            <p><span>投保人</span><span>{{fcinfo.appliName}}</span></p>
                            <p><span>证件类型</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='01'">身份证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='02'">居民户口薄</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='03'">驾驶证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='04'">中国因公护照</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='05'">中国因私护照</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='06'">往来港澳通行证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='07'">大陆居民往来台湾通行证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='08'">军官证/警官证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='09'">士兵证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='10'">军官离退休证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='11'">港澳居民来往内地通行证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='12'">台湾居民来往大陆通行证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='13'">香港身份证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='14'">澳门身份证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='15'">台湾身份证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='16'">外国护照</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='17'">外国人永久居留证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='18'">港澳台居民居住证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='29'">其它个人证件</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='33'">组织机构代码证</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='34'">统一社会信用代码</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='35'">营业执照</span>
                                <span class="sspan" v-show="fcinfo.appliCardType=='36'">税务登记证</span>
                            </p>
                            <p><span>证件号码</span><span>{{fcinfo.appliCardNo}}</span></p>
                            <!-- <p><span>证件号码</span><span v-text="fcinfo.appliCardNo.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')"></span></p> -->
                        </div>
                        <div class="c2_content1" v-show="show2">
                            <p><span>被保人</span><span>{{fcinfo.insuredName}}</span></p>
                            <p>
                                <span>证件类型</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='01'">身份证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='02'">居民户口薄</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='03'">驾驶证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='04'">中国因公护照</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='05'">中国因私护照</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='06'">往来港澳通行证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='07'">大陆居民往来台湾通行证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='08'">军官证/警官证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='09'">士兵证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='10'">军官离退休证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='11'">港澳居民来往内地通行证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='12'">台湾居民来往大陆通行证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='13'">香港身份证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='14'">澳门身份证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='15'">台湾身份证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='16'">外国护照</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='17'">外国人永久居留证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='18'">港澳台居民居住证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='29'">其它个人证件</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='33'">组织机构代码证</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='34'">统一社会信用代码</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='35'">营业执照</span>
                                <span class="sspan" v-show="fcinfo.insuredCardType=='36'">税务登记证</span>
                            </p>
                            <!-- <p><span>证件号码</span><span v-text="fcinfo.insuredCardNo.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')"></span></p> -->
                            <p><span>证件号码</span><span>{{fcinfo.insuredCardNo}}</span></p>
                        </div>
                    </div>
                </div>
            </div>

            <!--<div class="content4">-->
                <!--<div class="content4_c">-->
                    <!--<span>电子保单</span>-->
                <!--</div>-->
            <!--</div>-->
            <div class="content5">
                <p class="content5_p">
                    <span @click="check_warranty(fcinfo.policyNo)" class="content5_span1">
                        <span>查看电子保单</span>
                        <img src="~@/assets/img/rightbtn.png" alt="" class="icon1">
                    </span>
                    <span @click="download11(fcinfo.policyNo)" class="content5_span2">
                        <span>下载电子保单</span>
                        <img src="~@/assets/img/rightbtn.png" alt="" class="icon2">
                    </span>
                    <!--  <span @click="download(fcinfo.policyNo,fcinfo.riskCode,fcinfo.insuredCardNo)" class="content5_span2">
                    <img src="~@/assets/img/icon3.png" alt="" class="icon2">
                    <span>下载</span>
                </span> -->
                    <!--  <span v-clipboard:copy="pdfUrl" v-clipboard:success="onCopy" v-clipboard:error="onError" class="content5_span2">
                    <img src="~@/assets/img/icon3.png" alt="" class="icon2">
                    <span>下载</span>
                </span> -->
                    <span @click="popup()" class="content5_span3" style="border: none;">
                        <span>发送电子保单到邮箱</span>
                        <img src="~@/assets/img/rightbtn.png" alt="" class="icon3">
                    </span>
                </p>
            </div>
            <div v-show="showflag" style="height: 91px"></div>
        </div>
        <div class="popup" v-if="popupshow">
            <div class="popupcontent">
                <p>发送电子保单到邮箱</p>
                <input type="email" style="font-size: 16px;" placeholder="请输入邮箱地址" v-model="email.myInfo.emailVal">
                <!--<img src="~@/assets/img/left.png" alt="" class="left">-->
                <!--<button @click="check_email()">确认</button>-->
                <div style="position: absolute; bottom: 0;line-height: 45px;left: 0;border-top: 1px #f1ecec  solid;width: 100%;">
                    <div style="display: inline-block;width: 50%;height: 45px;text-align: center;font-size: 16px;border-right: 1px #f1ecec solid;" @click="close()">取消</div><div style="display: inline-block; width: 50%; height: 45px; text-align: center; font-size: 16px;color: #1B8F5A;font-weight: bold;" @click="check_email()">确定</div>
                </div>
                <!--<img src="~@/assets/img/close.png" alt="" class="close" @click="close()">-->
            </div>
        </div>
        <div class="renew_insurance" v-show="showflag">
            <!-- <img src="~@/assets/img/renewbg.png" alt=""> -->
            <div class="renew_content" >
                <div class="renew_icon" @click="remewfun">
                    <img src="~@/assets/img/ionn1.png" alt="">
                    <p>续保</p>
                </div>
                <div class="renew_icon">
                    <img src="~@/assets/img/ionn2.png" alt="">
                    <p>批改</p>
                </div>
                <div class="renew_icon">
                    <img src="~@/assets/img/ionn3.png" alt="">
                    <p>退保</p>
                </div>
            </div>
        </div>
        <div class="success_popup" v-if="success_popup">
            <div class="success_content">
                <img src="~@/assets/img/success.png" alt="" class="top">
                <p>电子保单已发送至邮箱<br />请注意查收</p>
                <button @click="close()">我知道了</button>
                <img src="~@/assets/img/close.png" alt="" class="close" @click="close()">
            </div>
        </div>
    </div>
</template>
<script lang="ts">
import '../../style/reservaIndex_index.css';
import 'vant/lib/toast/style';
import 'vant/lib/dialog/style';
import { Component, Vue, Prop } from 'vue-property-decorator';
import { cloudApi } from '@/api/indexApi';
import Header from '@/components/Header.vue';
import { Dialog } from 'vant';
import { Toast } from 'vant';
import { Alert } from '@/utils';
import VueClipboard from 'vue-clipboard2'
const AESEncode: any = (window as any).AESEncode;
const AESDecode: any = (window as any).AESDecode;
Vue.use(VueClipboard)
Vue.use(Dialog);
Component.registerHooks(['beforeRouteUpdate', 'beforeRouteLeave', 'beforeRouteLeave']);
@Component({
    components: { Header },
})
export default class PolicyDetails extends Vue {
    fcinfo: any = ''
    x: any = ''
    y: any = ''
    riskname: any = ''
    insured_first: any = [] // 身份证号
    tuandan: any = '' //groupFlag团单标识 1-团单 其他为个人
    relationFlag: any = '' //投保人/被保人
    isapp: any = '' //判断是否由小程序进入
    file: any = ''
    img_true: any = ''
    show1: any = true //用于选项卡切换
    show2: any = false
    aflog: any = '1'
    policyNo: any = '' //保单号
    popupshow: any = false //弹窗隐藏
    /*  */
    timeDifference: any = '' //页面加载埋点时间差(初始)
    lever: any = ''
    infoheader: any = '车险保单详情'
    licenseDetail: any = true
    insuredDetail: any = ''
    insured_name: any = ''
    insured_length: any = ''
    reference: any = ''
    name: any = ''
    openId: any = ''
    address: any = ''
    email: any = ''
    timeDifference1: any = ''
    userId: any = ''
    BFDReady: any = false
    success_popup: any = false
    showflag: any = false
    pdfUrl: any = "https://wechattest.chinalife-p.com.cn/wechatpageservice/download/downloadPersonCertificate.do?policyNo=6628222021139991000003&riskcode=2801&insuredCardNo=130225198008133515"
    data() {
        return {}
    }
    create() {}
    mounted() {
        //     Toast.loading({
        //   duration: 0,
        //   message: '加载中...',
        //   forbidClick: true,
        // });
        document.title = '保单管理'
        var word = '6602012020130497000001'
        var key = CryptoJS.enc.Utf8.parse("DZTB201908301724");
        var srcs = CryptoJS.enc.Utf8.parse(word);
        var encrypted = CryptoJS.AES.encrypt(srcs, key, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7
        });
        console.log(encodeURIComponent(encrypted.toString()))



        this.x = JSON.parse(localStorage.getItem('x'))
        this.y = JSON.parse(localStorage.getItem('y'))
        if (localStorage.getItem('riskname') != "null") {
            this.riskname = JSON.parse(localStorage.getItem('riskname'))
        }
        this.reference = JSON.parse(localStorage.getItem('reference')) //有openid
        this.email = JSON.parse(localStorage.getItem('email'))
        console.log("emailemailemailemailemail", this.email)
        this.warrantyDetails(this.x, this.y, this.riskname)
        this.activepeople(1)
    }
    //我的保险、保单明细 页面渲染数据
    warrantyDetails(x: any, y: any, riskname: any) {
        console.log("RRRRRRRR" + x, y, riskname)
        var _this = this
        _this.timeDifference = new Date().getTime();
        /* if(_this.lever==1){
            // _this.mainModal.hide();
            // _this.alertModal("您当前没有权限查看保单详情，请前往我的-个人信息-个人名片-信息维护中补充认证投保信息");
            return;
        } */
        if (y == 'f') {
            _this.infoheader = '非车险保单详情';
            _this.licenseDetail = false;
        } else {
            _this.infoheader = '车险保单详情';
            _this.licenseDetail = true
        }
        // // 点击保单列表埋点
        sensors.track('kf_InsuranceListClick', {
            // page_source: '我的保险',//页面来源 （我的保险）
            is_car: _this.licenseDetail ? '是' : '否',
            insurance_type: _this.licenseDetail ? '车险' : '非车险',
            insurance_name: x.riskname,
            insurance_id: x.policyNo,
            applicant: x.appliname,
            insurance_car: x.licenceplate,
            insurance_duration: x.startDate.substring(0, 10) + '至' + x.endDate1.substring(0, 10),
            insurance_state: x.number
        })
        console.log(_this.licenseDetail);
        // _this.mainModal.show();
        _this.policyNo = x.policyNo; //保单号
        _this.name = x.appliname
        _this.openId = _this.reference.openid
        _this.userid = _this.reference.userid
        var datajm: any = AESEncode({
            policyNo: _this.policyNo,
            openid: _this.openId,
            userid: _this.userid,
            code: _this.reference.code,
            name: _this.name,
            id_card: _this.reference.id_card
        })
        cloudApi
            .getMyPolicyDetailInfURL({
                result: datajm
            })
            .then(function(res) {
                // Toast.clear();
                // 页面加载埋点
                _this.timeDifference1 = new Date().getTime()
                var time = (_this.timeDifference1 - _this.timeDifference) / 1000;
                sensors.track('kf_PageLoading', {
                    page_title: document.title,
                    page_url: window.location.href,
                    loading_duration: time,
                    is_loading_success: '加载成功'
                })
                var data: any = JSON.parse(decodeURIComponent(atob(res.data.result)));
                console.log("getMyPolicyDetailInfURL解密", data)
                if (data.result.policydetailinf.riskCode.substring(0, 4) == "0201") {
                    let startTime = new Date(data.result.policydetailinf.endDate).getTime() //保单结束时间
                    let time = new Date().getTime() //当前时间
                    let day = parseInt((startTime - time) / (24 * 60 * 60 * 1000)) //天
                    if (day < 30 && day >= -90) {
                        _this.showflag = true
                    } else {
                        _this.showflag = false
                    }
                }
                console.log(data.result.policydetailinf.groupFlag)
                _this.tuandan = data.result.policydetailinf.groupFlag
                console.log(data.result.policydetailinf.relationFlag)
                _this.relationFlag = data.result.policydetailinf.relationFlag
                if (data.result == '') {
                    // _this.mainModal.hide();
                    // // 页面报错埋点
                    sensors.track('kf_PageError', {
                        page_title: document.title,
                        page_url: window.location.href,
                        error_reason: '保单详情可拨打95519进行查询。'
                    });
                    Dialog.alert({ title: '温馨提示', message: '保单详情可拨打95519进行查询。' });
                    return;
                }
                if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy' || data.result == 'forSecure') {
                    // _this.mainModal.hide();
                    // // 页面报错埋点
                    sensors.track('kf_PageError', {
                        page_title: document.title,
                        page_url: window.location.href,
                        error_reason: '暂未查询到保单详情，请您稍后再试'
                    });
                    Dialog.alert({ title: '温馨提示', message: '暂未查询到保单详情，请您稍后再试' });
                    return;
                }
                // 保单详情页浏览埋点
                sensors.track('kf_InsuranceDetailView', {
                    // page_source: '保单列表',//页面来源
                    is_car: _this.licenseDetail ? '是' : '否',
                    insurance_type: _this.licenseDetail ? '车险' : '非车险',
                    insurance_name: x.riskname,
                    insurance_id: x.policyNo,
                    applicant: x.appliname,
                    insurance_car: x.licenceplate,
                    insurance_duration: x.startDate.substring(0, 10) + '至' + x.endDate1.substring(0, 10),
                    insurance_state: x.number,
                    insurance_money: Number(data.result.policydetailinf.sumPremium)
                })
                var arr1 = data.result.policydetailinf.itemInfs
                for (var key in arr1) {
                    console.log(key, arr1)
                    // 保单详情页明细埋点
                    sensors.track('kf_InsuranceDetailProduct', {
                        // page_source: '保单列表',//页面来源
                        is_car: _this.licenseDetail ? '是' : '否',
                        insurance_type: _this.licenseDetail ? '车险' : '非车险',
                        insurance_name: x.riskname,
                        insurance_id: x.policyNo,
                        applicant: x.appliname,
                        insurance_car: x.licenceplate,
                        insurance_duration: x.startDate.substring(0, 10) + '至' + x.endDate1.substring(0, 10),
                        insurance_state: x.number,
                        product_rank: +(key + 1),
                        insurance_detail_name: arr1[key].itemName,
                        insurance_money: Number(data.result.policydetailinf.sumPremium),
                        insurance_amount: Number(arr1[key].itemAmount)
                    })
                }
                var arr = data.result.insureddetail;
                var arr_xin = [];
                for (var key in arr) {
                    arr_xin.push(arr[key].insuredName);
                }

                _this.insuredDetail = arr;
                _this.insured_first = arr[0];
                _this.insured_name = arr[0].insuredName;
                console.log(_this.insured_name);
                _this.insured_length = arr_xin.length;

                _this.fcinfo = data.result.policydetailinf;
                // 生产
                // _this.pdfUrl="https://wechat.chinalife-p.com.cn/wechatpageservice/download/downloadPersonCertificate.do?policyNo="+_this.fcinfo.policyNo+"&riskcode="+_this.fcinfo.riskCode+"&insuredCardNo="+_this.fcinfo.insuredCardNo
                if (_this.fcinfo.appliName.length>2) {
                     _this.fcinfo.appliName = _this.fcinfo.appliName.replace(/^(.+).(.)$/, "$1*$2");
                }else{
                    _this.fcinfo.appliName = _this.fcinfo.appliName.replace(/^(.+).$/, "$1*");
                }
                if(_this.fcinfo.insuredName.length>2){
                     _this.fcinfo.insuredName = _this.fcinfo.insuredName.replace(/^(.+).(.)$/, "$1*$2");
                 }else{
                    _this.fcinfo.insuredName = _this.fcinfo.insuredName.replace(/^(.+).$/, "$1*");
                 }
                // _this.fcinfo.startDate = _this.fcinfo.startDate.replace(/-/g, "/")
                // _this.fcinfo.endDate = _this.fcinfo.endDate.replace(/-/g, "/")
                _this.fcinfo.appliCardNo = _this.fcinfo.appliCardNo.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
                _this.fcinfo.insuredCardNo = _this.fcinfo.insuredCardNo.replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
                console.log(data.result.policydetailinf)
                console.log("this.fcinfo.startDate", typeof(_this.fcinfo.startDate))
                //列表页的保险名称带到详情页
                if (y == 'f') {
                    _this.fcinfo.riskName = riskname;
                    console.log("非车险保单详情保险名称", riskname);
                }
                if (_this.fcinfo.isExpire == '失效') {
                    _this.fcinfo.isExpire = '已过期'
                } else if (_this.fcinfo.isExpire == '有效') {
                    _this.fcinfo.isExpire = '保障中'
                }
                // else{
                //     _this.fcinfo.isExpire = '生效中'
                // }
                // _this.$router.push({
                //     path:'PolicyDetails'
                // })
                //  $scope.mainInfo.pushPage('view/myInsure/warrantyDetails.html');
                if (_this.BFDReady) {
                    if (_this.isapp == true) {
                        try {
                            _BFD.UserAction("APP_insuranceClick_numberdetails", {
                                "uid": _this.userId,
                                "openid": _this.openId,
                                "policyno": _this.policyNo,
                                "rem": data.result.policydetailinf.sumPremium,
                                "riskname": data.result.policydetailinf.riskName,
                                "state": data.result.isExpire
                            }); //保单号点击查看详情
                        } catch (e) {}
                    } else {
                        try {
                            _BFD.UserAction("insuranceClick_numberdetails", {
                                "uid": _this.userId,
                                "openid": _this.openId,
                                "policyno": _this.policyNo,
                                "rem": data.result.sumPremium,
                                "riskname": data.result.riskName,
                                "state": data.result.isExpire
                            }); //保单号点击查看详情
                        } catch (e) {}
                    }
                }
            })
            .catch(err => {
                Toast.clear();
                Toast.clear();
                Toast('网络请求不给力，请稍后重试');
                // Dialog.alert({ title: '温馨提示', message: '网络请求不给力，请稍后重试'});
                _this.$router.go(-1)
                // Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519！' });
            });
    }
    remewfun() {
        console.log("点击续保按钮")
        var word = this.policyNo //'6602012020130497000001'
        // var word='6602012020130497000001'
        var key = CryptoJS.enc.Utf8.parse("DZTB201908301724");
        var srcs = CryptoJS.enc.Utf8.parse(word);
        var encrypted = CryptoJS.AES.encrypt(srcs, key, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7
        });
        var policyNo = encodeURIComponent(encrypted.toString()) //http://chinalifebeta.china-sunfield.com/
        // window.location.href="https://hub.chinalife-p.com.cn/NCI/NCIcustom.html?policyNo=QB7CunKCh9uW72rRbCpZeXn92122Qmvc5miUlyyTjOc%3D&nonSalesCode=OfficialWeChatSelf#/NCITransferPage"
        //生产
        window.location.href = "https://hub.chinalife-p.com.cn/NCI/NCIcustom.html?policyNo=" + policyNo + "&nonSalesCode=OfficialWeChatSelf#/NCITransferPage" //生产链接
        //window.location.href="http://chinalifebeta.china-sunfield.com/NCI/NCIcustom.html?policyNo="+policyNo+"&nonSalesCode=OfficialWeChatSelf#/NCITransferPage"  //测试链接
    }
    onCopy() {
        Dialog.alert({ title: '温馨提示', message: '复制成功', confirmButtonText: '我知道了' });
    }
    onError() {
        Dialog.alert({ title: '温馨提示', message: '复制失败' });
    }
    download1() {
        var _this = this
        cloudApi
            .imageDownload({
                "inputPath": '827142021110106000001_1616130913576.pdf'
            })
            .then(function(res) {
                localStorage.setItem('pilicyimg', res.data.result)
                _this.$router.push({
                    path: 'downimg'
                })
            }).catch(err => {
            Toast.clear();
                Toast.clear();
                // $scope.mainModal.hide();
                Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
            });

    }
    //下载电子保单
    download(policyNo: any, riskCode: any, insuredCardNo: any) {
        // wx.downloadFile({
        //   url: 'https://wechattest.chinalife-p.com.cn/wechatpageview/common/img/company_tobg.png', //仅为示例，并非真实的资源
        //   success (res) {
        //     // 只要服务器有响应数据，就会把响应内容写入文件并进入 success 回调，业务需要自行判断是否下载到了想要的内容
        //     if (res.statusCode === 200) {
        //       wx.playVoice({
        //         filePath: res.tempFilePath
        //       })
        //     }
        //   }
        // })
        // wx.downloadImage({
        //   serverId: 'https://wechattest.chinalife-p.com.cn/wechatpageview/common/img/company_tobg.png', // 需要下载的图片的服务器端ID，由uploadImage接口获得
        //   isShowProgressTips: 1, // 默认为1，显示进度提示
        //   success: function (res) {
        //     var localId = res.localId;
        //     alert(res.localId)
        //     }// 返回图片下载后的本地ID
        // });
        // if(this.tuandan==1){
        //      Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
        // }else{

        window.location.href = 'https://wechattest.chinalife-p.com.cn/wechatpageservice/download/downloadPersonCertificate.do?policyNo=6628222021139991000003&riskcode=2801&insuredCardNo=130225198008133515'
        //    //生产
        //    //window.location.href="https://wechat.chinalife-p.com.cn/wechatpageservice/download/downloadPersonCertificate.do?policyNo="+policyNo+"&riskcode="+riskCode+"&insuredCardNo="+insuredCardNo
        //    // window.location.href="http://wechattest.chinalife-p.com.cn/wechatpageservice/download/downloadPersonCertificate.do?policyNo="+policyNo+"&riskcode="+riskCode+"&insuredCardNo="+insuredCardNo
        // }
    }
    download11(policyNo: any) {

        var _this = this;
        if (_this.openId == undefined) {
            _this.openId = "";
        }
        if (_this.tuandan == 1 && _this.relationFlag == 2) { //groupFlag团单标识 1-团单 其他为个人
            // $scope.mainModal.show();
            var data: any = AESEncode({
                policyno: _this.policyNo, //827032019110106000087保单号
                open_id: _this.openId,
                classcode: "", //27
                riskcode: _this.fcinfo.riskCode, //2703
                orgnum: "",
                opid: "",
                elemstatue: "1", //第三方调用 保单状态 1位电子保单，2为电子批单
                name: "nothird", //第三方调用
                password: "nothird", //第三方调用
                openid: _this.openId,
                userid: "",
                insuredCardNo: _this.insured_first.insuredCardNo
            });
            console.log("personCertificateURL入参加密", data)
            cloudApi
                .personCertificateURL({
                    result: data
                })
                .then(function(res) {
                    //  $scope.mainModal.hide();
                    Toast.clear();
                    var data: any = AESDecode(res.data.result);
                    console.log("personCertificateURL返参", data)
                    if (data.code == "error" && data.result == "查询失败") {
                        // $scope.mainModal.show();
                        console.log('返参error&&查询失败error&&查询失败error&&查询失败调用旧接口')
                        var data: any = AESEncode({
                            policyno: _this.policyNo, //827032019110106000087
                            open_id: _this.openId,
                            classcode: "", //27
                            riskcode: _this.fcinfo.riskCode, //2703
                            orgnum: "",
                            opid: "",
                            elemstatue: "1", //第三方调用 保单状态 1位电子保单，2为电子批单
                            name: "nothird", //第三方调用
                            password: "nothird", //第三方调用
                            openid: _this.openId,
                            userid: ""
                        });
                        console.log("checkpolicyURL入参", data)
                        cloudApi
                            .checkpolicyURL({
                                result: data
                            })
                            .then(function(res) {
                                Toast.clear();
                                // $scope.mainModal.hide();
                                var data: any = AESDecode(res.data.result);
                                console.log("checkpolicyURL返参", data)
                                if (data.result == "noelectpolicy") {
                                    Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。' });
                                    //页面报错埋点
                                    sensors.track('kf_PageError', {
                                        page_title: document.title,
                                        page_url: window.location.href,
                                        error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                                    });
                                } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                                    Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                                    // 页面报错埋点
                                    sensors.track('kf_PageError', {
                                        page_title: document.title,
                                        page_url: window.location.href,
                                        error_reason: '暂未查询到电子保单，请您稍后再试'
                                    });
                                } else {
                                    if (_this.BFDReady) {
                                        if (_this.isapp == true) {
                                            try {
                                                _BFD.UserAction("APP_insuranceClick_elepolicy", {
                                                    "uid": _this.userId,
                                                    "openid": _this.openId,
                                                    "policyno": policyNo
                                                }); //保单号查看电子保单
                                            } catch (e) {}
                                        } else {
                                            try {
                                                _BFD.UserAction("insuranceClick_elepolicy", {
                                                    "uid": _this.userId,
                                                    "openid": _this.openId,
                                                    "policyno": policyNo
                                                }); //保单号查看电子保单
                                            } catch (e) {}
                                        }
                                    }
                                    _this.address = data.result;
                                    _this.file = _this.address;
                                    console.log(_this.file)
                                    if (_this.file.substring(_this.file.length - 3, _this.file.length) == "pdf") {
                                        _this.img_true = false;
                                        var ua = navigator.userAgent.toLowerCase();
                                        console.log((ua.match(/android/i)));
                                        if ((ua.match(/android/i)) == "android") {
                                            if (_this.isapp == true) {
                                                // window.location.href=_this.file;
                                                //生产
                                                _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                // window.location.href = _this.file;
                                                // var me_two =window.open(_this.file,'电子保单','width:400px;height:100%;');
                                                cloudApi.imageDownload({
                                                        "inputPath": _this.file.split("send/")[1]
                                                    })
                                                    .then(function(res) {
                                                        localStorage.setItem('pilicyimg', res.data.result)
                                                        _this.$router.push({
                                                            path: 'downimg'
                                                        })
                                                    }).catch(err => {
                                                    Toast.clear();
                                                        Toast.clear();
                                                        // $scope.mainModal.hide();
                                                        Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                                    });
                                            } else {
                                                // _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                                // var me_two = window.open(_this.file, '电子保单', 'width:400px;height:100%;');
                                                //生产
                                                _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                // window.location.href = _this.file;
                                                cloudApi.imageDownload({
                                                        "inputPath": _this.file.split("send/")[1]
                                                    })
                                                    .then(function(res) {
                                                        localStorage.setItem('pilicyimg', res.data.result)
                                                        _this.$router.push({
                                                            path: 'downimg'
                                                        })
                                                    }).catch(err => {
                                                    Toast.clear();
                                                        Toast.clear();
                                                        // $scope.mainModal.hide();
                                                        Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                                    });
                                            }
                                        } else {
                                            console.log(333);
                                            // window.location.href = _this.file;
                                            cloudApi.imageDownload({
                                                    "inputPath": _this.file.split("send/")[1]
                                                })
                                                .then(function(res) {
                                                    localStorage.setItem('pilicyimg', res.data.result)
                                                    _this.$router.push({
                                                        path: 'downimg'
                                                    })
                                                }).catch(err => {
                                                Toast.clear();
                                                    Toast.clear();
                                                    // $scope.mainModal.hide();
                                                    Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                                });
                                        }
                                    } else {
                                        _this.img_true = true;
                                        // _this.mainInfo.pushPage("view/myInsure/myInsure_eleinvoice.html")
                                    }
                                }
                            })
                            .catch(err => {
                                Toast.clear();
                                Toast.clear();
                                // $scope.mainModal.hide();
                                Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询' });
                            });

                    } else {
                        if (data.result == "noelectpolicy") {
                            Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。' });
                            // 页面报错埋点
                            sensors.track('kf_PageError', {
                                page_title: document.title,
                                page_url: window.location.href,
                                error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                            });
                        } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                            Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                            // 页面报错埋点
                            sensors.track('kf_PageError', {
                                page_title: document.title,
                                page_url: window.location.href,
                                error_reason: '暂未查询到电子保单，请您稍后再试'
                            });
                        } else {
                            if (_this.BFDReady) {
                                if (_this.isapp == true) {
                                    try {
                                        _BFD.UserAction("APP_insuranceClick_elepolicy", {
                                            "uid": _this.userId,
                                            "openid": _this.openId,
                                            "policyno": policyNo
                                        }); //保单号查看电子保单
                                    } catch (e) {}
                                } else {
                                    try {
                                        _BFD.UserAction("insuranceClick_elepolicy", {
                                            "uid": _this.userId,
                                            "openid": _this.openId,
                                            "policyno": policyNo
                                        }); //保单号查看电子保单
                                    } catch (e) {}
                                }
                            }
                            _this.address = data.result;
                            _this.file = _this.address;
                            console.log(_this.file)
                            if (_this.file.substring(_this.file.length - 3, _this.file.length) == "pdf") {
                                _this.img_true = false;
                                var ua = navigator.userAgent.toLowerCase();
                                console.log(_this.isapp)
                                // console.log((ua.match(/android/i)));
                                if ((ua.match(/android/i)) == "android") {
                                    if (_this.isapp == true) {
                                        // window.location.href=_this.file;
                                        _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                        // window.location.href = _this.file;
                                        cloudApi.imageDownload({
                                                "inputPath": _this.file.split("send/")[1]
                                            })
                                            .then(function(res) {
                                                localStorage.setItem('pilicyimg', res.data.result)
                                                _this.$router.push({
                                                    path: 'downimg'
                                                })
                                            }).catch(err => {
                                            Toast.clear();
                                                Toast.clear();
                                                // $scope.mainModal.hide();
                                                Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                            });
                                        // var me_two =window.open(_this.file,'电子保单','width:400px;height:100%;');
                                    } else {
                                        _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                        // var me_two = window.open(_this.file, '电子保单', 'width:400px;height:100%;');
                                        cloudApi.imageDownload({
                                                "inputPath": _this.file.split("send/")[1]
                                            })
                                            .then(function(res) {
                                                localStorage.setItem('pilicyimg', res.data.result)
                                                _this.$router.push({
                                                    path: 'downimg'
                                                })
                                            }).catch(err => {
                                            Toast.clear();
                                                Toast.clear();
                                                // $scope.mainModal.hide();
                                                Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                            });
                                    }
                                } else {
                                    console.log(333);
                                    // window.location.href = _this.file;
                                    cloudApi.imageDownload({
                                            "inputPath": _this.file.split("send/")[1]
                                        })
                                        .then(function(res) {
                                            localStorage.setItem('pilicyimg', res.data.result)
                                            _this.$router.push({
                                                path: 'downimg'
                                            })
                                        }).catch(err => {
                                        Toast.clear();
                                            Toast.clear();
                                            // $scope.mainModal.hide();
                                            Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                        });
                                }
                            } else {
                                _this.img_true = true;
                                // _this.mainInfo.pushPage("view/myInsure/myInsure_eleinvoice.html")
                            }
                        }
                    }
                })
                .catch(err => {
                    Toast.clear();
                    Toast.clear();
                    // $scope.mainModal.hide();
                    Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
                });
        } else {
            //调原来的接口
            //  _this.mainModal.show();
            //aes加密
            var data: any = AESEncode({
                policyno: policyNo, //827032019110106000087
                open_id: _this.openId,
                classcode: "", //27
                riskcode: _this.fcinfo.riskCode, //2703
                orgnum: "",
                opid: "",
                elemstatue: "1", //第三方调用 保单状态 1位电子保单，2为电子批单
                name: "nothird", //第三方调用
                password: "nothird", //第三方调用
                openid: _this.openId,
                userid: ""
            });
            console.log("checkpolicyURL加密", data)
            cloudApi
                .checkpolicyURL({
                    result: data
                })
                .then(function(res) {
                    // $scope.mainModal.hide();
                    Toast.clear();
                    var data: any = AESDecode(res.data.result);
                    console.log("checkpolicyURL解密", data);
                    if (data.result == "noelectpolicy") {
                        Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
                        // 页面报错埋点
                        sensors.track('kf_PageError', {
                            page_title: document.title,
                            page_url: window.location.href,
                            error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                        });
                    } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                        Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                        // 页面报错埋点
                        sensors.track('kf_PageError', {
                            page_title: document.title,
                            page_url: window.location.href,
                            error_reason: '暂未查询到电子保单，请您稍后再试'
                        });
                    } else {
                        if (_this.BFDReady) {
                            if (_this.isapp == true) {
                                try {
                                    _BFD.UserAction("APP_insuranceClick_elepolicy", {
                                        "uid": _this.userId,
                                        "openid": _this.openId,
                                        "policyno": policyNo
                                    }); //保单号查看电子保单
                                } catch (e) {}
                            } else {
                                try {
                                    _BFD.UserAction("insuranceClick_elepolicy", {
                                        "uid": _this.userId,
                                        "openid": _this.openId,
                                        "policyno": policyNo
                                    }); //保单号查看电子保单
                                } catch (e) {}
                            }
                        }
                        _this.address = data.result;
                        _this.file = _this.address;
                        console.log(_this.file)
                        if (_this.file.substring(_this.file.length - 3, _this.file.length) == "pdf") {
                            _this.img_true = false;
                            var ua = navigator.userAgent.toLowerCase();
                            if ((ua.match(/android/i)) == "android") {
                                if (_this.isapp == true) {
                                    // window.location.href=_this.file;
                                    //生产
                                    _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    cloudApi.imageDownload({
                                            "inputPath": _this.file.split("send/")[1]
                                        })
                                        .then(function(res) {
                                            localStorage.setItem('pilicyimg', res.data.result)
                                            _this.$router.push({
                                                path: 'downimg'
                                            })
                                        }).catch(err => {
                                        Toast.clear();
                                            Toast.clear();
                                            // $scope.mainModal.hide();
                                            Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                        });
                                    // _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                    // window.location.href = _this.file;
                                    // var me_two =window.open(_this.file,'电子保单','width:400px;height:100%;');
                                } else {
                                    //生产
                                    _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    cloudApi.imageDownload({
                                            "inputPath": _this.file.split("send/")[1]
                                        })
                                        .then(function(res) {
                                            localStorage.setItem('pilicyimg', res.data.result)
                                            _this.$router.push({
                                                path: 'downimg'
                                            })
                                        }).catch(err => {
                                        Toast.clear();
                                            Toast.clear();
                                            // $scope.mainModal.hide();
                                            Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                        });
                                    // _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                    // var me_two = window.open(_this.file, '电子保单', 'width:400px;height:100%;');
                                }
                            } else {
                                console.log(333);
                                cloudApi.imageDownload({
                                        "inputPath": _this.file.split("send/")[1]
                                    })
                                    .then(function(res) {
                                        localStorage.setItem('pilicyimg', res.data.result)
                                        _this.$router.push({
                                            path: 'downimg'
                                        })
                                    }).catch(err => {
                                    Toast.clear();
                                        Toast.clear();
                                        // $scope.mainModal.hide();
                                        Dialog.alert({ title: '温馨提示', message: '暂时不能为您服务，请拨打95519或4008695519' });
                                    });
                            }
                        } else {
                            _this.img_true = true;
                            // _this.mainInfo.pushPage("view/myInsure/myInsure_eleinvoice.html")
                        }
                    }
                })
                .catch(err => {
                    Toast.clear();
                    Toast.clear();
                    // $scope.mainModal.hide();
                    Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
                });
        }
    }

    //查看电子保单
    check_warranty(policyNo: any) {

        var _this = this;
        if (_this.openId == undefined) {
            _this.openId = "";
        }
        if (_this.tuandan == 1 && _this.relationFlag == 2) { //groupFlag团单标识 1-团单 其他为个人
            // $scope.mainModal.show();
            var data: any = AESEncode({
                policyno: _this.policyNo, //827032019110106000087保单号
                open_id: _this.openId,
                classcode: "", //27
                riskcode: _this.fcinfo.riskCode, //2703
                orgnum: "",
                opid: "",
                elemstatue: "1", //第三方调用 保单状态 1位电子保单，2为电子批单
                name: "nothird", //第三方调用
                password: "nothird", //第三方调用
                openid: _this.openId,
                userid: "",
                insuredCardNo: _this.insured_first.insuredCardNo
            });
            console.log("personCertificateURL入参加密", data)
            cloudApi
                .personCertificateURL({
                    result: data
                })
                .then(function(res) {
                    //  $scope.mainModal.hide();
                    Toast.clear();
                    var data: any = AESDecode(res.data.result);
                    console.log("personCertificateURL返参", data)
                    if (data.code == "error" && data.result == "查询失败") {
                        // $scope.mainModal.show();
                        console.log('返参error&&查询失败error&&查询失败error&&查询失败调用旧接口')
                        var data: any = AESEncode({
                            policyno: _this.policyNo, //827032019110106000087
                            open_id: _this.openId,
                            classcode: "", //27
                            riskcode: _this.fcinfo.riskCode, //2703
                            orgnum: "",
                            opid: "",
                            elemstatue: "1", //第三方调用 保单状态 1位电子保单，2为电子批单
                            name: "nothird", //第三方调用
                            password: "nothird", //第三方调用
                            openid: _this.openId,
                            userid: ""
                        });
                        console.log("checkpolicyURL入参", data)
                        cloudApi
                            .checkpolicyURL({
                                result: data
                            })
                            .then(function(res) {
                                Toast.clear();
                                // $scope.mainModal.hide();
                                var data: any = AESDecode(res.data.result);
                                console.log("checkpolicyURL返参", data)
                                if (data.result == "noelectpolicy") {
                                    Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。' });
                                    //页面报错埋点
                                    sensors.track('kf_PageError', {
                                        page_title: document.title,
                                        page_url: window.location.href,
                                        error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                                    });
                                } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                                    Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                                    // 页面报错埋点
                                    sensors.track('kf_PageError', {
                                        page_title: document.title,
                                        page_url: window.location.href,
                                        error_reason: '暂未查询到电子保单，请您稍后再试'
                                    });
                                } else {
                                    if (_this.BFDReady) {
                                        if (_this.isapp == true) {
                                            try {
                                                _BFD.UserAction("APP_insuranceClick_elepolicy", {
                                                    "uid": _this.userId,
                                                    "openid": _this.openId,
                                                    "policyno": policyNo
                                                }); //保单号查看电子保单
                                            } catch (e) {}
                                        } else {
                                            try {
                                                _BFD.UserAction("insuranceClick_elepolicy", {
                                                    "uid": _this.userId,
                                                    "openid": _this.openId,
                                                    "policyno": policyNo
                                                }); //保单号查看电子保单
                                            } catch (e) {}
                                        }
                                    }
                                    _this.address = data.result;
                                    _this.file = _this.address;
                                    console.log(_this.file)
                                    if (_this.file.substring(_this.file.length - 3, _this.file.length) == "pdf") {
                                        _this.img_true = false;
                                        var ua = navigator.userAgent.toLowerCase();
                                        console.log((ua.match(/android/i)));
                                        if ((ua.match(/android/i)) == "android") {
                                            if (_this.isapp == true) {
                                                // window.location.href=_this.file;
                                                //生产
                                                _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                _this.activepeople1(_this.file)
                                                // window.location.href = _this.file;
                                                // var me_two =window.open(_this.file,'电子保单','width:400px;height:100%;');
                                            } else {
                                                // _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                                // var me_two = window.open(_this.file, '电子保单', 'width:400px;height:100%;');
                                                //生产
                                                _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                                _this.activepeople1(_this.file)
                                                // window.location.href = _this.file;
                                            }
                                        } else {
                                            console.log(333);
                                            _this.activepeople1(_this.file)
                                            // window.location.href = _this.file;
                                        }
                                    } else {
                                        _this.img_true = true;
                                        // _this.mainInfo.pushPage("view/myInsure/myInsure_eleinvoice.html")
                                    }
                                }
                            })
                            .catch(err => {
                                Toast.clear();
                                Toast.clear();
                                // $scope.mainModal.hide();
                                Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询' });
                            });

                    } else {
                        if (data.result == "noelectpolicy") {
                            Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。' });
                            // 页面报错埋点
                            sensors.track('kf_PageError', {
                                page_title: document.title,
                                page_url: window.location.href,
                                error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                            });
                        } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                            Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                            // 页面报错埋点
                            sensors.track('kf_PageError', {
                                page_title: document.title,
                                page_url: window.location.href,
                                error_reason: '暂未查询到电子保单，请您稍后再试'
                            });
                        } else {
                            if (_this.BFDReady) {
                                if (_this.isapp == true) {
                                    try {
                                        _BFD.UserAction("APP_insuranceClick_elepolicy", {
                                            "uid": _this.userId,
                                            "openid": _this.openId,
                                            "policyno": policyNo
                                        }); //保单号查看电子保单
                                    } catch (e) {}
                                } else {
                                    try {
                                        _BFD.UserAction("insuranceClick_elepolicy", {
                                            "uid": _this.userId,
                                            "openid": _this.openId,
                                            "policyno": policyNo
                                        }); //保单号查看电子保单
                                    } catch (e) {}
                                }
                            }
                            _this.address = data.result;
                            _this.file = _this.address;
                            console.log(_this.file)
                            if (_this.file.substring(_this.file.length - 3, _this.file.length) == "pdf") {
                                _this.img_true = false;
                                var ua = navigator.userAgent.toLowerCase();
                                console.log(_this.isapp)
                                // console.log((ua.match(/android/i)));
                                if ((ua.match(/android/i)) == "android") {
                                    if (_this.isapp == true) {
                                        // window.location.href=_this.file;
                                        _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                        _this.activepeople1(_this.file)
                                        // window.location.href = _this.file;
                                        // var me_two =window.open(_this.file,'电子保单','width:400px;height:100%;');
                                    } else {
                                        _this.activepeople1(_this.file)
                                        // _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                        // var me_two = window.open(_this.file, '电子保单', 'width:400px;height:100%;');
                                    }
                                } else {
                                    console.log(333);
                                    _this.activepeople1(_this.file)
                                    // window.location.href = _this.file;
                                }
                            } else {
                                _this.img_true = true;
                                // _this.mainInfo.pushPage("view/myInsure/myInsure_eleinvoice.html")
                            }
                        }
                    }
                })
                .catch(err => {
                    Toast.clear();
                    Toast.clear();
                    // $scope.mainModal.hide();
                    Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
                });
        } else {
            //调原来的接口
            //  _this.mainModal.show();
            //aes加密
            var data: any = AESEncode({
                policyno: policyNo, //827032019110106000087
                open_id: _this.openId,
                classcode: "", //27
                riskcode: _this.fcinfo.riskCode, //2703
                orgnum: "",
                opid: "",
                elemstatue: "1", //第三方调用 保单状态 1位电子保单，2为电子批单
                name: "nothird", //第三方调用
                password: "nothird", //第三方调用
                openid: _this.openId,
                userid: ""
            });
            console.log("checkpolicyURL加密", data)
            cloudApi
                .checkpolicyURL({
                    result: data
                })
                .then(function(res) {
                    // $scope.mainModal.hide();
                    Toast.clear();
                    var data: any = AESDecode(res.data.result);
                    console.log("checkpolicyURL解密", data);
                    if (data.result == "noelectpolicy") {
                        Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
                        // 页面报错埋点
                        sensors.track('kf_PageError', {
                            page_title: document.title,
                            page_url: window.location.href,
                            error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                        });
                    } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                        Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                        // 页面报错埋点
                        sensors.track('kf_PageError', {
                            page_title: document.title,
                            page_url: window.location.href,
                            error_reason: '暂未查询到电子保单，请您稍后再试'
                        });
                    } else {
                        if (_this.BFDReady) {
                            if (_this.isapp == true) {
                                try {
                                    _BFD.UserAction("APP_insuranceClick_elepolicy", {
                                        "uid": _this.userId,
                                        "openid": _this.openId,
                                        "policyno": policyNo
                                    }); //保单号查看电子保单
                                } catch (e) {}
                            } else {
                                try {
                                    _BFD.UserAction("insuranceClick_elepolicy", {
                                        "uid": _this.userId,
                                        "openid": _this.openId,
                                        "policyno": policyNo
                                    }); //保单号查看电子保单
                                } catch (e) {}
                            }
                        }
                        _this.address = data.result;
                        _this.file = _this.address;
                        console.log(_this.file)
                        if (_this.file.substring(_this.file.length - 3, _this.file.length) == "pdf") {
                            _this.img_true = false;
                            var ua = navigator.userAgent.toLowerCase();
                            if ((ua.match(/android/i)) == "android") {
                                if (_this.isapp == true) {
                                    // window.location.href=_this.file;
                                    //生产
                                    _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    _this.activepeople1(_this.file)
                                    //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    // window.location.href = _this.file;
                                    // _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                    // window.location.href = _this.file;
                                    // var me_two =window.open(_this.file,'电子保单','width:400px;height:100%;');
                                } else {
                                    //生产
                                    _this.file = "https://wechat.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    _this.activepeople1(_this.file)
                                    //_this.file = "https://wechattest.chinalife-p.com.cn/wechatpageview/PDF.js/web/viewer.html?file=" + _this.file;
                                    // window.location.href = _this.file;
                                    // _this.file = "PDF.js/web/viewer.html?file=" + _this.file;
                                    // var me_two = window.open(_this.file, '电子保单', 'width:400px;height:100%;');
                                }
                            } else {
                                console.log(333);
                                _this.activepeople1(_this.file)
                                // window.location.href = _this.file;
                            }
                        } else {
                            _this.img_true = true;

                            // _this.mainInfo.pushPage("view/myInsure/myInsure_eleinvoice.html")
                        }
                    }
                })
                .catch(err => {
                    Toast.clear();
                    Toast.clear();
                    // $scope.mainModal.hide();
                    Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
                });
        }
    }
    activepeople1(url){
        var Today=new Date();
        // var datee=Today.getFullYear()+"-"+(Today.getMonth()+1)+"-"+Today.getDate()
        cloudApi.saveToRedis({
        //     userId:localStorage.getItem('maiuserid'),
        //     operationCode:"1381908367600062464",
        //     sysId:"1",
        //     date:datee
            userId: localStorage.getItem('maiuserid'),
            sysId:'',//系统id
            operationCode:'1381906956233543680'//操作id
        })
        .then(function(res) {
             window.location.href =url;
        })
        .catch(err => {
            Toast.clear();
             window.location.href =url;
        });
    }

    //投保人被保人切换
    activepeople(num: any) {
        this.aflog = num
        if (num == 1) {
            this.show1 = true;
            this.show2 = false;
        } else {
            this.show1 = false
            this.show2 = true;
        }
        console.log(this.aflog, this.show1, this.show2)
    }
    //禁止滚动动
    stop() {
        var mo = function(e: any) {
            e.preventDefault();
        }
        document.body.style.overflow = 'hidden'
        document.addEventListener("touchmove", mo, false)
        console.log("滚动条禁用")
    }
    //取消滚动限制
    move() {
        var mo = function(e: any) {
            e.preventDefault();
        }
        document.body.style.overflow = '' //出现滚动条
        document.addEventListener("touchmove", mo, false)
    }
    //发送至邮箱出现弹窗
    popup() {
        //页面禁止滚动
        this.stop()
        this.popupshow = true
    }
    //邮箱弹窗下的关闭按钮
    close() {
        //取消滚动限制
        this.move()
        this.popupshow = false
        this.success_popup = false
    }
    //验证邮箱是否正确
    check_email() {
        var _this = this

        this.move()
        if (!_this.email.myInfo.emailVal) {
            console.log(_this.email.myInfo.emailVal)
            Dialog.alert({ title: '温馨提示', message: '请输入邮箱信息' });
            return
        } else {
            var strRegex = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/;
            if (!strRegex.test(_this.email.myInfo.emailVal)) {
                Dialog.alert({ title: '温馨提示', message: '您的邮箱格式不正确' });
                return false;
            }
            console.log(_this.tuandan)
            if (_this.tuandan == 1 && _this.relationFlag == 2) { //groupFlag团单标识 1-团单 其他为个人 relationFlag;//当前人身份：1-投保人、2-被保人
                // $scope.mainModal.show();
                // aes加密
                var data: any = AESEncode({
                    policyno: _this.fcinfo.policyNo, //保单号827032019110106000087
                    open_id: _this.openId, //"fa5cacbaa0b7ff1ef03a0534b521ed1513460ad52babab9e809cdc19b683fa80",
                    classcode: _this.fcinfo.riskCode.slice(0, 2), //"05",//"05",//险别27
                    riskcode: _this.fcinfo.riskCode, //"0507",//险种2703
                    orgnum: _this.fcinfo.comCode, //"4301309001",//出单机构
                    opid: "",
                    elemstatue: "1",
                    name: "nothird",
                    password: "nothird",
                    premium: _this.fcinfo.sumPremium, //"60.00",//保费
                    appclientname: _this.fcinfo.appliName, //"appclientname",//保人姓名****
                    pro_name: _this.fcinfo.riskName, //"pro_name",//产品名称
                    toUser: _this.email.myInfo.emailVal, //用户邮箱
                    insuredCardNo: _this.insured_first.insuredCardNo //被保险人身份证号
                });
                console.log("personCentificateSendToEmailURL加密", data)
                Toast.loading({
                    duration: 0,
                    message: '加载中...',
                    forbidClick: true,
                });
                cloudApi
                    .personCentificateSendToEmailURL({
                        result: data
                    })
                    .then(function(res) {
                        // $scope.mainModal.hide();
                        console.log('调用新接口')
                        //aes解密
                        var data: any = AESDecode(res.data.result);
                        console.log("personCentificateSendToEmailURL解密", data);
                        Toast.clear();
                        if (data.result == "error") {
                            //   $scope.mainModal.show();
                            var data: any = AESEncode({
                                policyno: _this.fcinfo.policyNo, //保单号827032019110106000087
                                open_id: _this.openId, //"fa5cacbaa0b7ff1ef03a0534b521ed1513460ad52babab9e809cdc19b683fa80",
                                classcode: _this.fcinfo.riskCode.slice(0, 2), //"05",//"05",//险别27
                                riskcode: _this.fcinfo.riskCode, //"0507",//险种2703
                                orgnum: _this.fcinfo.comCode, //"4301309001",//出单机构
                                opid: "",
                                elemstatue: "1",
                                name: "nothird",
                                password: "nothird",
                                premium: _this.fcinfo.sumPremium, //"60.00",//保费
                                appclientname: _this.fcinfo.appliName, //"appclientname",//保人姓名****
                                pro_name: _this.fcinfo.riskName, //"pro_name",//产品名称
                                toUser: _this.email.myInfo.emailVal, //用户邮箱
                                insuredCardNo: _this.policyNo //被保险人身份证号
                            });
                            console.log("sendToEmailURL加密", data)
                            Toast.loading({
                                duration: 0,
                                message: '加载中...',
                                forbidClick: true,
                            });
                            cloudApi
                                .sendToEmailURL({
                                    result: data
                                })
                                .then(function(res: any) {
                                    Toast.clear();

                                    // $scope.mainModal.hide();
                                    //aes解密
                                    var data: any = AESDecode(res.data.result);
                                    console.log("sendToEmailURL解密", data);
                                    if (data.result == "1") {
                                        _this.popupshow = false
                                        // _this.success_popup = true
                                        Dialog.alert({ title: '温馨提示', message: '信息已发至您的邮箱' });
                                        /*  naviDialog.hide(); //隐藏alert弹出框
                                         modalHtmlService.dialogsShowHtml("view/myInsure/dialogConfirm.html", $scope) */

                                    } else if (data.result == "noelectpolicy") {
                                        // 页面报错埋点
                                        sensors.track('kf_PageError', {
                                            page_title: document.title,
                                            page_url: window.location.href,
                                            error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                                        });
                                        Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。' });
                                    } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                                        // 页面报错埋点
                                        sensors.track('kf_PageError', {
                                            page_title: document.title,
                                            page_url: window.location.href,
                                            error_reason: '暂未查询到电子保单，请您稍后再试'
                                        });
                                        Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                                    } else {
                                        Dialog.alert({ title: '温馨提示', message: '网络错误，邮件发送失败' });
                                        // 页面报错埋点
                                        sensors.track('kf_PageError', {
                                            page_title: document.title,
                                            page_url: window.location.href,
                                            error_reason: '网络错误，邮件发送失败'
                                        });
                                    }
                                }).catch((err: any) => {
                                    Toast.clear();

                                    // $scope.mainModal.hide();
                                    Dialog.alert({ title: '温馨提示', message: '网络错误，邮件发送失败' });
                                })
                        } else {

                            if (data.result == "1") {
                                _this.popupshow = false
                                // _this.success_popup = true
                                Dialog.alert({ title: '温馨提示', message: '信息已发至您的邮箱' });
                                /* naviDialog.hide(); //隐藏alert弹出框
                                modalHtmlService.dialogsShowHtml("view/myInsure/dialogConfirm.html", $scope) */

                            } else if (data.result == "noelectpolicy") {
                                // 页面报错埋点
                                sensors.track('kf_PageError', {
                                    page_title: document.title,
                                    page_url: window.location.href,
                                    error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                                });
                                Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。' });
                            } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                                // 页面报错埋点
                                sensors.track('kf_PageError', {
                                    page_title: document.title,
                                    page_url: window.location.href,
                                    error_reason: '暂未查询到电子保单，请您稍后再试'
                                });
                                Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                            } else {
                                // 页面报错埋点
                                sensors.track('kf_PageError', {
                                    page_title: document.title,
                                    page_url: window.location.href,
                                    error_reason: '网络错误，邮件发送失败'
                                });
                                Dialog.alert({ title: '温馨提示', message: '网络错误，邮件发送失败' });
                            }
                        }
                    }).catch((err: any) => {
                        Toast.clear();

                        // $scope.mainModal.hide();
                        Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单为团体保单，暂不支持电子保单查询，请拨打95519咨询。' });
                    })
            } else {
                console.log('调用旧接口')
                // console.log($scope.fcinfo.riskCode.slice(0,2))
                // $scope.mainModal.show();

                //aes加密
                var data: any = AESEncode({
                    policyno: _this.fcinfo.policyNo, //保单号827032019110106000087
                    open_id: _this.openId, //"fa5cacbaa0b7ff1ef03a0534b521ed1513460ad52babab9e809cdc19b683fa80",
                    classcode: _this.fcinfo.riskCode.slice(0, 2), //"05",//"05",//险别27
                    riskcode: _this.fcinfo.riskCode, //"0507",//险种2703
                    orgnum: _this.fcinfo.comCode, //"4301309001",//出单机构
                    opid: "",
                    elemstatue: "1",
                    name: "nothird",
                    password: "nothird",
                    premium: _this.fcinfo.sumPremium, //"60.00",//保费
                    appclientname: _this.fcinfo.appliName, //"appclientname",//保人姓名****
                    pro_name: _this.fcinfo.riskName, //"pro_name",//产品名称
                    toUser: _this.email.myInfo.emailVal, //用户邮箱
                    insuredCardNo: _this.policyNo //被保险人身份证号
                });
                console.log("sendToEmailURL加密", data)
                cloudApi
                    .sendToEmailURL({
                        result: data
                    })
                    .then(function(res: any) {
                        // $scope.mainModal.hide();
                        //aes解密
                        Toast.clear();
                        var data: any = AESDecode(res.data.result);
                        console.log("sendToEmailURL解密", data);
                        if (data.result == "1") {
                            _this.popupshow = false
                            // _this.success_popup = true
                            Dialog.alert({ title: '温馨提示', message: '信息已发至您的邮箱'});
                            /* naviDialog.hide(); //隐藏alert弹出框
                            modalHtmlService.dialogsShowHtml("view/myInsure/dialogConfirm.html", $scope) */
                        } else if (data.result == "noelectpolicy") {
                            // 页面报错埋点
                            sensors.track('kf_PageError', {
                                page_title: document.title,
                                page_url: window.location.href,
                                error_reason: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。'
                            });

                            Dialog.alert({ title: '温馨提示', message: '尊敬的客户，此张保单暂不支持电子保单查看，请稍后再试或拨打95519查询。' });
                        } else if (data.result == 'NoPolicy' || data.result == 'NoMatchPolicy') {
                            // 页面报错埋点
                            sensors.track('kf_PageError', {
                                page_title: document.title,
                                page_url: window.location.href,
                                error_reason: '暂未查询到电子保单，请您稍后再试'
                            });
                            Dialog.alert({ title: '温馨提示', message: '暂未查询到电子保单，请您稍后再试' });
                        } else {
                            Dialog.alert({ title: '温馨提示', message: '网络错误，邮件发送失败' });
                            // 页面报错埋点
                            sensors.track('kf_PageError', {
                                page_title: document.title,
                                page_url: window.location.href,
                                error_reason: '网络错误，邮件发送失败'
                            });
                        }
                    }).catch((err: any) => {
                        Toast.clear();

                        // $scope.mainModal.hide();
                        Dialog.alert({ title: '温馨提示', message: '网络错误，邮件发送失败' });
                    })
            }
        }
    }
}
</script>
<style lang="less" scoped>
* {
    touch-action: pan-y;
}

.policydetails {
    width: 100%;
    overflow: hidden;
    min-height: 100%;
    background-color: #F6F7FB;
    position: relative;
}

.pdbg {
    width: 100%;
    height: 145px;
    background-image: url(../../assets/img/bg.png);
    background-size: 100% 100%;
}

.policydetailsconyent {
    width: 354px;
    overflow: hidden;
    margin: -125px auto 0;
}

.renew_insurance {
    width: 100%;
    height: 91px;
    /*margin: 10px 0 0 0;*/
    /*background-image: url(../../assets/img/renew.png);*/
    /*background-size: 100% 100%;*/
    position: fixed;
    bottom: 0;
    background: white;
}

// .renew_insurance img{
//     width: 100%;
//     height: 100%;
// }
.renew_content {
    width: 90%;
    height: 100%;
    position: relative;
    margin: 0 auto;
}

.renew_icon {
    display: inline-block;
    width: 33%;
    height: 91px;
    text-align: center;
    margin-top: 13px;
}

.renew_text {
    position: relative;
    top: 9px;
    left: 50%;
    font-size: 14px;
}

.renew_icon img {
    width: 29px;
}

.content1 {
    width: 100%;
    overflow: hidden;
    background-color: #fff;
    border-radius: 4px;
    /* box-shadow: 1px 5px 10px #eaeaea; */
    /*border-radius: 10px;*/
}

.itemtitle {
    width: 100%;
    height: 46px;
}

.itemtitle_div2 {
    width: 100%;
    height: 100%;
}

.itemtitle_div2 .titlename {
    display: block;
    float: left;
    width: 70%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    /*color: #D09800;*/
    color: #222222;
    padding: 0 0 0 15px;
    font-size: 18px;
    margin: 13px 0 0 0;
    font-weight: bolder;
}

.stateactive3 {
    background-image: url(../../assets/img/bz3.png);
    background-repeat: no-repeat;
    background-size: 100%;

}

.stateactive4 {
    background-image: url(../../assets/img/bz4.png);
    background-repeat: no-repeat;
    background-size: 100%;
}

.stateactive5 {

    background-image: url(../../assets/img/bz5.png);
    background-repeat: no-repeat;
    background-size: 100%;
}

.itemtitle_div2 .topright {
    float: right;
    margin-top: 9px;
    width: 72px;
    height: 27px;
}

.itemtitle_div2 .topright .state {
    font-size: 14px;
    display: block;
    float: left;
    margin: 8px 0 0 13px;
}

.itemcontent p {
    width: 90%;
    margin: 10px auto;
}

.itemcontent p span:first-child {
    font-size: 14px;
    color: #666;
}

.itemcontent p span:last-child {
    display: block;
    float: right;
    font-size: 14px;
}

hr {
    width: 90%;
    height: 1px;
    border: none;
    margin: 0 auto;
    background-color: #EEEEEE;
}

.sum {
    float: right;
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    letter-spacing: 1px;
    font-size: 14px;
    color: #222222;
     font-weight: bolder;
}

.sum span {
    color: #009B63;
    /*font-size: 21px;*/
    font-weight: normal;
}

.content2 {
    width: 100%;
    overflow: hidden;
    // height: 191px;
    /*margin: 10px 0;*/
    background-color: #fff;
    border-radius: 0 0 4px 4px;
    /*border-radius: 10px;*/
}

.c2 {
    width: 100%;
    float: left;
}

.c2_title {
    width: 95%;
    height: 41px;
    border-bottom: 1px solid #eae8e8;
    /* padding-bottom: 12px; */
    margin: 0.44rem auto  3px;
    /* border-radius: 0.133333rem; */
    box-sizing: inherit;
    font-weight: bolder;
}

.c2_title1 {
    /*border-left: none !important;*/
    /*border-radius: 8px 5px 5px 8px;*/
}

.c2_title2 {
    border-right: none !important;
    border-radius: 5px 8px 8px 5px;
}

.c2_title span {
    display: block;
    float: left;
    width: 24%;
    height: 100%;
    color: #222222;
    /* text-align: center; */
    line-height: 0.933333rem;
    font-size: 18px;
}

.c2_title .active {
    background-color: #46A087;
    background: url(../../assets/img/qqbottom.png) no-repeat 8px 37px;
    background-size: 30px 5px;
    /* left: 10px; */
    /* border-radius: 0.133333rem; */
    color: #009B63;
    /* background-repeat: no-repeat; */
    font-size: 0.48rem;
}

.c2_cc {
    width: 95%;
    overflow: hidden;
    margin: 10px auto 10px;
}

.c2_content1 {
    width: 100%;
    overflow: hidden;
}

.c2_content1 p {
    width: 100%;
    overflow: hidden;
    color: #234439;
    font-size: 14px;
    margin: 15px 0 0 0;
}

.c2_content1 p span:first-child {
    /* margin: 0 0 0 15px; */
    display: block;
    float: left;
    width: 20%;
}

.c2_content1 p span:last-child {
    display: block;
    float: right;
    word-wrap: break-word;
    text-align: right;
    width: 70%;
    color: #666666
}

.c2_content1 p:nth-child(2) .sspan {
    display: block;
    float: right;
    width: 70%;
    text-align: right;
    color: #666666
}

.content3 {
    width: 100%;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #fff;
    /*border-radius: 10px;*/
    margin-top: 10px;
    border-radius: 4px 4px 0 0;
}

.c3 {
    width: 100%;
    height: 100%;
    float: left;
}

.c3 p {
    width: 95%;
    margin: 0 auto;
}

.c3>p {
    color: #009B63;
    font-size: 18px;
    letter-spacing: 1px;
    margin: 10px auto 16px;
    font-weight: bolder;
    width: 95%;
    overflow: hidden;
    /* margin: 0 auto; */
}

.c3 div {
    width: 95%;
    overflow: hidden;
    margin: 0 auto;
}

.c3 div>p {
    width: 100%;
    /* height: 20px; */
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666666;
    float: left;
    display: block;
}

.c3 div>p:first-child {
    font-size: 14px;
    color: #000;
}

.c3 div p:first-child {
    width: 100%;
}

.c3 div p:first-child span:last-child {
    display: block;
    float: right;
}

.c3 div p span:first-child {
    display: block;
    float: left;
    width: 73%;
    font-size: 12px;
    color: #292929;
    /*   overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis; */
}

.c3 div p span:last-child {
    display: block;
    float: right;
    color:#8a8a8a;
    font-size: 12px;
}

.c3 div p span img {
    width: 16px;
    height: 14px;
}

.content4 {
    width: 100%;
    height: 25px;
    margin: 20px 0 0 0;

}

.content4_c {
    width: 100%;
    margin: 12px 0 0 0;
}

.content4_c span {
    display: block;
    float: left;
    font-size: 16px;
    color: #46A087;
    padding: 0 10px;
    margin: -10px 0 0 0;
}

.content4_c::before {
    content: "";
    width: 36%;
    height: 2px;
    display: block;
    background: -webkit-linear-gradient(to right, #fff, #46A087);
    background: -o-linear-gradient(to right, #fff, #46A087);
    background: -moz-linear-gradient(to right, #fff, #46A087);
    background: linear-gradient(to right, #fff, #46A087);
    float: left;
}

.content4_c::after {
    content: "";
    width: 36%;
    height: 2px;
    display: block;
    float: left;
    background: -webkit-linear-gradient(to right, #46A087, #fff);
    background: -o-linear-gradient(to right, #46A087, #fff);
    background: -moz-linear-gradient(to right, #46A087, #fff);
    background: linear-gradient(to right, #46A087, #fff);
}

.content5 {
    width: 100%;
    /* height: 2.133333rem; */
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 4px;
}

.content5_p {
    width: 95%;
    /*height: 37px;*/
    background-color: #fff;
    margin: 0 auto;
}

.content5_span1,
.content5_span2,
.content5_span3 {
    display: block;
    height: 50px;
    /* padding: 0 0.426667rem; */
    color: #fff;
    font-size: 0.346667rem;
    line-height: 50px;
    background-color: #fff;
    color: #222222;
    border-bottom: 0.026667rem solid #eae8e8;
    font-weight: bolder;
}

.content5_span1 span,
.content5_span2 span,
.content5_span3 span {
/* padding: 0 8px; */
}

.icon1 {
height: 7px;
    display: inline-block;
    float: right;
    /* vertical-align: middle; */
    margin-top: 20px;
}

.icon2 {
    height: 7px;
    display: inline-block;
    float: right;
    /* vertical-align: middle; */
    margin-top: 20px;
}

.icon3 {
    height: 7px;
    display: inline-block;
    float: right;
    /* vertical-align: middle; */
    margin-top: 20px;
}

.popup,
.success_popup {
position: fixed;
bottom: 0px;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .1);
display: flex;
align-items: center;
justify-content: center;
}

.popupcontent {
    width: 295px;
    height: 164px;
background-color: #fff;
position: relative;
border-radius: 10px;
}

.left {
width: 120px;
height: 186px;
position: absolute;
top: -54px;
right: 0px;
z-index: 1;
}

.popupcontent p {
    color: #2D2D2D;
    font-size: 17px;
    position: absolute;
    top: 24px;
    left: 65px;
}

.popupcontent input {
outline: none;
border: none;
/*background-color: #F1F2FA;*/
border-radius: 5px;
width: 220px;
height: 40px;
position: absolute;
top: 57px;
left: 30px;
z-index: 2;
padding: 0 5px;
 outline-color: invert ;
    outline-style: none ;
    outline-width: 0px ;
    border: none ;
    border-style: none ;
    text-shadow: none ;
    -webkit-appearance: none ;
    -webkit-user-select: text ;
    outline-color: transparent ;
border: 1px solid #ccc;
text-indent: 12px;
}

.popupcontent button,
.success_content button {
width: 100%;
height: 33px;
background-color: #46A087;
color: #fff;
outline: none;
border: none;
font-size: 14px;
position: absolute;
bottom: 0px;
border-radius: 0 0 5px 5px;
}

.close {
width: 30px;
height: 30px;
position: absolute;
bottom: -40px;
left: 42%;
}

.success_content {
width: 273px;
height: 163px;
background-color: #fff;
position: relative;
border-radius: 5px;
}

.success_content .top {
width: 100px;
height: 75px;
position: absolute;
left: 32%;
top: -23%;
}

.success_content p {
width: 154px;
height: 45px;
position: absolute;
top: 25%;
left: 21%;
text-align: center;
line-height: 30px;
font-size: 14px;
letter-spacing: 1px;
color: #4D4D4D;
}
</style>
